<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户账户信息列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>用户名：</label>
                            <select name="userName" ID="ele">


                            </select>
                        </li>
                        <li>
                            <label>ETC 账户名：</label>
                            <input type="text" name="accerName"/>
                        </li>
                        <li>
                            <label>ETC 账户号：</label>
                            <input type="text" name="acctId"/>
                        </li>
                        <li>
                            <label>订单号：</label>
                            <input type="text" name="orderId"/>
                        </li>
                        <li>
                            <label>手机号：</label>
                            <input type="text" name="phone"/>
                        </li>
                        <li>
                            <label>车架号：</label>
                            <input type="text" name="vin"/>
                        </li>
                        <li>
                            <label>车牌号：</label>
                            <input type="text" name="plateNo"/>
                        </li>
                        <li>
                            <label>秘钥：</label>
                            <input type="text" name="accerKey"/>
                        </li>
                        <li>
                            <label>SN号：</label>
                            <input type="text" name="obuSn"/>
                        </li>
                        <li>
                            <label>卡号：</label>
                            <input type="text" name="icNumber"/>
                        </li>
                        <li>
                            <label>银行id：</label>
                            <input type="text" name="beanId"/>
                        </li>
                        <li>
                            <label>预开户主键ID：</label>
                            <input type="text" name="preDataId"/>
                        </li>
                        <li>
                            <label>工行e钱包账户号：</label>
                            <input type="text" name="ebagNo"/>
                        </li>
                        <li>
                            <label>ETC状态：</label>
                            <select name="accerStatus">
                                <option value="">所有</option>
                                <option value="7"> ETC申请-审核通过</option>
                                <option value="6">ETC申请-审核不通过</option>

                            </select>
                        </li>
                        <li>
                            <label>是否删除：</label>
                            <select name="isDelete">
                                <option value="">所有</option>
                                <option value="1">删除</option>
                                <option value="0">不删除</option>
                            </select>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="acctinfo:acctinfo:add">
                <i class="fa fa-plus"></i> 添加
            </a>
            <a class="btn btn-primary single disabled" onclick="$.operate.edit()"
               shiro:hasPermission="acctinfo:acctinfo:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
               shiro:hasPermission="acctinfo:acctinfo:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="acctinfo:acctinfo:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('acctinfo:acctinfo:edit')}]];
    var removeFlag = [[${@permission.hasPermi('acctinfo:acctinfo:remove')}]];
    var prefix = ctx + "acctinfo/acctinfo";

    $(function () {
            // fun();
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "用户账户信息",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'id',
                        title: '主键id',
                        visible: false
                    },
                    {
                        field: 'userName',
                        title: '用户名'
                    },
                    {
                        field: 'accerName',
                        title: 'ETC 账户名'
                    },
                    {
                        field: 'acctId',
                        title: 'ETC 账户号'
                    },
                    {
                        field: 'orderId',
                        title: '订单号'
                    },
                    {
                        field: 'phone',
                        title: '手机号'
                    },
                    {
                        field: 'vin',
                        title: '车架号'
                    },
                    {
                        field: 'plateNo',
                        title: '车牌号'
                    },
                    {
                        field: 'accerKey',
                        title: '秘钥'
                    },
                    {
                        field: 'obuSn',
                        title: 'SN号'
                    },
                    {
                        field: 'icNumber',
                        title: '卡号'
                    },
                    {
                        field: 'beanId',
                        title: '银行id'
                    },
                    {
                        field: 'preDataId',
                        title: '预开户主键ID'
                    },
                    {
                        field: 'ebagNo',
                        title: '工行e钱包账户号'
                    },
                    {
                        field: 'accerStatus',
                        title: 'ETC状态'
                    },
                    {
                        field: 'isDelete',
                        title: '是否删除'
                    },
                    {
                        title: '操作',
                        align: 'center',
                        formatter: function (value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                            return actions.join('');
                        }
                    }]
            };
            $.table.init(options);
        }
    )
    ;

    // function fun() {
    //     $.ajax({
    //         type: "POST",
    //         url: "/acctinfo/acctinfo/list",
    //         success: function (data) {
    //
    //             var vaule = data.total;
    //
    //             if (vaule > 0) {
    //                 datas = data.rows;
    //
    //                 var optionstring = "";
    //                 for (var j = 0; j < datas.length; j++) {
    //                     console.log(datas[j].userName);
    //                     optionstring += "<option value=\"" + datas[j].userName + "\" >" + datas[j].userName + "</option>";
    //                 }
    //
    //                 $("#ele").html(optionstring);
    //             } else {
    //                 alert("暂无文件选择，请先上传文件！")
    //
    //                 $("#ele").html("<option value=''>暂无</option>");
    //
    //             }
    //         }
    //     });
    // }


</script>
</body>
</html>